<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/view/include/css-include.jsp"%>
<%@ include file="/view/include/jsp-include.jsp"%>
<%@ include file="/view/include/jquery-include.jsp"%>
<%@ include file="/view/include/treeView-include.jsp"%>
<script type="text/javascript">
$().ready(function(){
   
});

function goTarget(arg1, arg2){
    parent.rightF.location = arg1;
}

function onUpdateUser(arg, arg1, arg2){
    parent.rightF.location ="/myInfoUpdate.html?userId="+arg;
}

var menuIdTmp = "";
var menuImgTmp = "";

function onClicked(arg, arg2){
    //alert(arg+"//"+arg2);
    $("#"+arg2).attr("class", "");
    $("#"+arg2).attr("class","sub"+arg+"_on");

    if(menuIdTmp != ""){
    	if(menuIdTmp != arg2){
	        $("#"+menuIdTmp).attr("class", "");
	        $("#"+menuIdTmp).attr("class","sub"+menuImgTmp);
    	}
    }

    menuIdTmp = arg2;
    menuImgTmp = arg;
}

function aaaa(a, b){
	alert(a +"//"+ b);
}

</script>
<div class="UserWrap">
    <ul>
        <li class="Username">${userInfo.userName}</li>
        <li class="UserTeam"></li>
        <li class="btnUser">
            <a href="javascript:onUpdateUser('${userInfo.userId}');"><img src="/images/web/btn_userUpdate.png" /></a>
            <a href="/common/login/logout.html" target='_parent'><img src="/images/web/btn_logout.png" /></a>
        </li>
    </ul>
</div>
<div class="submenuWrap">
    <ul class="submenul" id="submenuId">
        <c:set var="menuData" value="${menuId}"> </c:set>
        <c:forEach items="${requestScope.menuList}" var="list" varStatus="status">
            <c:if test="${list.menuId == menuData}">
                <script type="text/javascript">
                    goTarget("<c:out value='${list.menuPath}'/>", "rightF");
                </script>
            </c:if>
            <c:if test="${list.menuLevel > '0'}">
                <li class="sub<c:out value='${list.menuImgPath}'/>" id="<c:out value='${list.menuId}'/>" onclick="onClicked('<c:out value='${list.menuImgPath}'/>', '<c:out value='${list.menuId}'/>');">
                    <a href="<c:out value='${list.menuPath}'/>" target='rightF'></a>
                </li>
            </c:if>
            <c:if test="${list.menuId == menuData}">
                <script type="text/javascript">
                    onClicked("<c:out value='${list.menuImgPath}'/>", "<c:out value='${list.menuId}'/>");
                </script>
            </c:if>
        </c:forEach>
    </ul>
    <ul class="submenumain">
        <li class="submenu_m0"><a href="/main.html" target='_parent'>go main</a></li>
    </ul>
</div>
<!-- table width="100%" height="100" border="0" class="screenTmp">
    <tr>
        <td>
            <div class="UserWrap">
            <ul>
                <li class="Username">${userInfo.userName}</li>
                <li class="UserTeam">end user</li>
                <li class="btnUser">
                    <a href="#"><img src="/images/web/btn_userUpdate.png" /></a>
                    <a href="/common/login/logout.html" target='_parent'><img src="/images/web/btn_logout.png" /></a>
                </li>
            </ul>
            </div>
        </td>
    </tr>
</table>
<table border="0">
    <tr>
        <td class="UserWrap2" valign="top">
            <div id="treecontrol" style="font-family: Verdana, helvetica, arial, sans-serif;">
                <img src="/images/minus.gif"><a href="#"> Close</a> | 
                <img src="/images/plus.gif"><a href="#"> Open</a> | 
                <a href="#">Toggle All</a>
            </div>
            <ul id="red" class="treeview-red">
            <c:forEach items="${requestScope.menuList}" var="list" varStatus="status">
                    <c:if test="${list.menuLevel == '1'}">
                    <li class="open" style="font-family: Verdana, helvetica, arial, sans-serif;">
                        <span><c:out value="${list.menuName}"/></span>
                        <ul id="selectedUl">
                            <c:forEach items="${requestScope.menuList}" var="listDetail" varStatus="statusDetail">
                                <c:if test="${list.menuId == listDetail.parentMenuId}">
                                    <li style="font-family: Verdana, helvetica, arial, sans-serif; font-size: 90%;">
                                        <a href="<c:out value='${listDetail.menuPath}'/>" target='rightF'>
                                            <span id="<c:out value="${listDetail.menuId}"/>" class="selectedCss"><c:out value="${listDetail.menuName}"/></span>
                                        </a>
                                    </li>
                                </c:if>
                            </c:forEach>
                        </ul>
                    </li>
                    </c:if>
            </c:forEach>
            </ul>
        </td>       
    </tr>
</table-->
